package org.performancetracker;

import org.performancetracker.api.Tracker;
import org.performancetracker.api.Aggregator;
import static org.mockito.Mockito.mock;

/**
 * @author: jaronschut
 */

public class TrackerFactoryImpl {

	private static Aggregator lastAggregator;

	public static Tracker startTracker() {
		lastAggregator = null;
		return mock(Tracker.class);
	}

	public static Tracker startTracker(Aggregator aggregator) {
		lastAggregator = aggregator;
		return mock(Tracker.class);
	}

	public static Aggregator getLastTrackerAggregator() {
		return lastAggregator;
	}

	public static void setLastTrackerAggregator(Aggregator lastAggregator) {
		org.performancetracker.TrackerFactoryImpl.lastAggregator = lastAggregator;
	}
}
